dxp-ux

(0 reviews)

POST Product Order (TMF 622)

This operation provides following features for

PR:

  1. will create the AddLine Order in Salesforce
  2. AddOn create request towards Salesforce
  3. To turn on or off e-bill entity

PA:

  1. To buy a plan for prepaid customers.
URL
https://[localhost]:[port]/dxp-ux/v1/{businessId}/productOrder
URL PARAMS
nametypedescriptionrequired (mandatory-Y, optional-N, Not applicable- N/A)
businessIdstring2 letter ISO 3166 country code (TT, BB, JM, PA, PR etc.) identifying the business unit.Y (PR, PA)
namevaluedescriptionrequired (mandatory-Y, optional-N, Not applicable- N/A)
client_idstringThe client_id identifying the channel.Y (PR ) ,
Y (PA)
client_secretstringPassword associated with the client_id.Y (PR) ,
Y (PA)
X-Correlation-IDstringIdentifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction.Y(PR - AddLine), N(PR- AddOn), Y(PA)
channelIdstringchannelId to identify the business group. Expected APPY(PR-ebill), N/A(PA)
lobstringThe Line of Business Identifier currently available are:PREPAID, POSTPAID,FIXEDN(PR-ebill), N/A(PA)
Data Model - Request:

Each of the request parameters is detailed.

nametype (Length for PR- AddLine)descriptionrequired (mandatory-Y, optional-N, Not applicable- N/A)
channel[]arrayA list of related channels
Note for PA: It is mandatory for business
Y (PR-AddLine), N(PR - AddOn), Y(PA)
channel[].idstring (20)Unique identifier of the channel
Note for PA: It is mandatory for business
Y(PR-AddLine), N(PR - AddOn), Y(PA)
channel[].namestring (20)Name of the channelN/A(PR), N(PA)
categorystringUsed to categorize the order from a business perspective that can be useful for the OM system (e.g. "enterprise", "residential", ...).N(PR - ebill) , Y (PA)
descriptionstring (30)reason, Eg: "Add New Line"Y(PR-AddLine), N/A(PA)
externalIdstring (20)a unique id of the order from the source systemY(PR-AddLine), N/A(PA)
billingAccountobjectAccount reference.Y(PR-AddLine), N(PR-ebill), N/A(PA)
billingAccount.idstring (30)Account numberY(PR-AddLine), N( PR- ebill), N/A(PA)
billingAccount.namestringName of the account, this is not passing to SalesforceN(PR-AddLine), N/A(PA)
billingAccount.@typestringReference type, this is not passing to SalesforceN(PR-AddLine), N(PR- ebill), N/A(PA)
paymentarraypayment info. Mandatory only if paymentCaptured is trueY*(PR-AddLine), N/A(PA)
payment.idstring (30)Payment transactionId. Mandatory only if paymentCaptured is trueY*(PR-AddLine), N/A(PA)
@typestring (20)request type information: Expected value will be: 'AddLine' Note- To work this functionality this type should be passed as 'AddLine'Y(PR-AddLine), N(PR - AddOn), N(PR - ebill), N(PA)
productOrderItemarrayA list of product order itemsY(PR-AddLine), N(PR - AddOn), Y(PA)
productOrderItem.idStringIdentifier of the line item (generally it is a sequence number 01, 02, 03...)Y (PR-ebill), N(PA)
productOrderItem.quantityintegerQuantity ordered.N(PR-ebill), N(PA)
productOrderItem.actionStringaction of the project order item
Note for PR ebill: The action is used to ON or OFF eBill. Can be: add, delete.
Note for PA: Possible values are "add"
N(PR - AddOn), Y(PR-ebill), N(PA)
productOrderItem.@typeStringtype of the product.N(PR - AddOn), N/A(PA)
productOrderItem.productOfferingobjectProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information.Y(PA)
productOrderItem.productOffering.idstringUnique identifier of a productOfferingY(PA)
productOrderItem.productobjectA product ref or valueY(PR-AddLine), N(PR - AddOn), N(PR-ebill), Y(PA)
productOrderItem.product.idStringUnique identifier of the product.N(PR - AddOn), N(PR-ebill), N/A(PA)
productOrderItem.product.nameStringName of the product. It could be the same as the name of the product offering.N(PR - AddOn), N/A(PA)
productOrderItem.product.isBundleBooleanIf true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOfferingN(PR-ebill), N/A(PA)
productOrderItem.product.@typeStringWhen sub-classing, this defines the sub-class entity nameN(PR-ebill), N/A(PA)
productOrderItem.product.productCharacteristic[]ArrayDescribes a given characteristic of an object or entity through a name/value pair.Y(PR-AddLine), N(PR-ebill), Y(PA)
productOrderItem.product.productCharacteristic[].nameStringName of the characteristic
Note for PA:Possible Value is "MSISDN"
Y(PR-AddLine), Y(PR-ebill), Y(PA)
productOrderItem.product.productCharacteristic[].valueObject/ArrayThe value of the characteristicY(PR-AddLine), N(PR-ebill), Y(PA)
productOrderItem.product.productCharacteristic[].valueTypestringValue data typeN(PR-AddLine), N(PR-ebill), N/A(PA)
productOrderItem.product.productCharacteristic[].@typeStringWhen sub-classing, this defines the sub-class entity nameN(PR - ebill), N/A(PA)
productOrderItem.product.itemPriceObject ArrayAn amount, usually of money, that represents the actual price paid by the Customer for this item or this order.N(PR - AddOn), N/A(PA)
productOrderItem.product.itemPrice.nameStringname of the priced itemN(PR - AddOn), N/A(PA)
productOrderItem.product.itemPrice.descriptionStringdescription of the priced itemN(PR - AddOn), N/A(PA)
productOrderItem.product.itemPrice.priceObjectitem price objectN(PR - AddOn), N/A(PA)
productOrderItem.product.itemPrice.price.dutyFreeAmountObjectduty free amount objectN(PR - AddOn), N/A(PA)
productOrderItem.product.itemPrice.price.dutyFreeAmount.unitStringunits of the amountN(PR - AddOn), N/A(PA)
productOrderItem.product.itemPrice.price.dutyFreeAmount.valuenumberprice valueN(PR - AddOn), N/A(PA)
relatedParty[]arrayrelated partyN(PR - AddOn), N(PR-ebill), N/A(PA)
relatedParty[].idStringunique identifier of the related partyN(PR - AddOn), N(PR-ebill), N/A(PA)
relatedParty[].nameStringname of the related partyN(PR - AddOn), N(PR-ebill), N/A(PA)
relatedParty[].@referredTypeStringThe actual type of the target instance when needed for disambiguation.Y(PR-ebill), N/A(PA)
notearrayExtra information about a given entityN(PR-ebill), N/A(PA)
note.textStringText of the note.N(PR-ebill), N/A(PA)
note.@typeStringDefines type as
1. OrderReasonCode and default value is 'NT'
2. CampaignCode and default value is 'ECO'.
N(PR-ebill), N/A(PA)
Statusstringenum: - acknowledgedN(PR-ebill), N/A(PA)

channel[] subResource request dataModel:

nametypedescriptionrequired (mandatory-Y, optional-N, Not applicable- N/A)example
idstringunique identifier of the channelY(PA)PA: "id": "APP"
namestringName of the channelN(PA)PA: "name": "APP"
productOrderItem subResource request dataModel:
fieldtypedescriptionrequired (mandatory-Y, optional-N, Not applicable- N/A)example
idstringservice NumberY(PA)PA:
"id": "1"
quantityintegerQuantity orderedY(PA)PA:
"quantity": 1
actionstringaction of the project order itemY(PA)PA:
"action": "add"
productOfferingobjectA product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing informationY(PA)PA:
"productOffering": {
"id": "3940",
}
productOffering.idstringUnique identifier of a productOfferingY(PA)PA:
"id": "3940"
productobjectA product to be created defined by value or existing defined by reference.Y(PA)PA:
"product" :
{
"productCharacteristic": [{
"name": "MSISDN",
"value": "69877689"
}]
}
product.productCharacteristicarrayDescribes a given characteristic of an object or entity through a name/value pair.Y(PA)PA:
"productCharacteristic" : [{
"name": "MSISDN",
"value": "69877689"
}]

productOrderItem[].product.productCharacteristic[] subResource request and response dataModel:

nametypedescriptionrequired (mandatory-Y, optional-N, Not applicable- N/A)example
MSISDNstringservice NumberY(PA)PA:
{"name": "MSISDN",
"value": "69877689" }

note subResource - dataModel:

@typetyperequired (mandatory-Y, optional-N, Not applicable- N/A)example
OrderReasonCodestringN (PR- ebill) , N/A (PA)PR: {"text": "NT","@type": "OrderReasonCode"}
CampaignCodestringN (PR - ebill), N/A (PA)PR: {"text": "ECO","@type": "CampaignCode"}
CONSENTS productCharacteristic values for PR- AddLine usecase:
characteristic nametype (Length)descriptionrequired
consentsArrayContainer for customer consentsY*
consentLanguagestring (10)Language of the consents, Eg: EN or ESY*
consents[].typestring (20)Type of the consentY*
consents[].idstring (20)Id of the consentY*
consents[].consentTextVersionstring (5)version of the consentY*
consents[].statestring (20)state of the consent (Consented / Not Consented)Y*

Note for PR AddLine usecase : Only 'GeneralTnC' is mandatory, Others optional depends on order

DELIVERY-ADDRESS productCharacteristic values for PR- AddLine usecase:
characteristic nametype (Length)descriptionrequired
deliveryAddressobjectDelivery AddressY
street1string (50)Street 1 of addressY
street2string (50)Street 2 of addressN
citystring (50)City nameY
postalcodestring (50)Postal codeY
statestring (50)State codeY
countrystring (50)Country codeY
deliveryTypestring (20)must be 'Mail Delivery'Y
deliverySpeedstring (20)must be 'Standard'Y
LINE-DETAILS productCharacteristic values for PR- AddLine usecase:
characteristic nametype (Length for PR-AddLine)descriptionrequired
lineDetailsarrayDetails of each line including plan and deviceY
lineNumberstring (5)1, 2,3 etc - its mandatory if lineDetails object is presentY
planDetailsobjectDetails of the planY
planDetails{}.msisdnstring (20)New msisdn for this lineY
planDetails{}.nokiaReservationIdstring (30)Nokia reservation id of the msisdnY
planDetails{}.planSkustring (60)The salesforce Product codeY
planDetails{}.simTypestring (30)Type of the simY
planDetails{}.aliasFirstNamestring (50)First name of the customer holding this lineY
planDetails{}.aliasLastNamestring (50)Last name of the customer holding this lineY
planDetails{}.addOnDetailsarrayAdd on details. Note - Minimum one object is mandatory if this addOnDetails array comes.N
planDetails{}.addOnDetails[].addonNamestring (60)add-on nameY
planDetails{}.addOnDetails[].addonIdstring (60)add-on unique codeY
planDetails{}.addOnDetails[].attributeCodestring (60)attribute unique codeY
planDetails{}.addOnDetails[].attributeValuestring (60)attribute valueY
deviceDetailsobjectDevice detailsY
deviceDetails{}.deviceSkustring (20)sku of the deviceY
deviceDetails{}.reservationIdstring (20)SAP reservation id of the deviceY
deviceDetails{}.installmentsbooleantrue or falseY
deviceDetails{}.quickUpgradebooleantrue OR falseY
deviceDetails{}.insurancestring (20)1 OR 4 OR blankN
deviceDetails{}.byodbooleantrue OR falseN
deviceDetails{}.byodDetails{}objectBYOD detailsN
deviceDetails{}.byodDetails{}.imeistringIMEI number of the deviceN
deviceDetails{}.byodDetails{}.modelstringDevice ModelN
deviceDetails{}.byodDetails{}.manufacturerstringDevice ManufacturerN
deviceDetails{}.byodDetails{}.capacitystringDevice storage capacityN
deviceDetails{}.byodDetails{}.colorstringDevice colorN
deviceDetails{}.installmentDetailsobjectmandatory if Installments is trueY*
deviceDetails{}.installmentDetails{}.termstring (5)The term of the installmentY
deviceDetails{}.installmentDetails{}.frequencyAmountstring (10)The monthly installment amountY
deviceDetails{}.installmentDetails{}.financedAmountstring (10)Total financed amountY
deviceDetails{}.installmentDetails{}.downpaymentstring (10)Down payment of the installmentY
deviceDetails{}.installmentDetails{}.downpaymentTaxstring (10)Tax of down paymentY
CREDIT-DETAILS productCharacteristic values for PR- AddLine usecase:
characteristic nametype (Length)descriptionrequired
creditDetailsobjectCredit infoN
creditScorestring (10)Credit scoreN
creditSegmentstring (5)credit SegmentN
creditScoreDatestring (20)Credit score captured dateN

Note for PR AddLine usecase: All three credit check parameters together are mandatory OR all of them together optional.

PAYMENT-DETAILS productCharacteristic values for PR- AddLine usecase:
characteristic nametype (Length)descriptionrequired
PaymentDetailsobjectPayment infoY
paymentCapturedbooleanPayment Captured (true OR false)Y
Data Model - Response:

Each of the response parameters is detailed.

nametypedescriptionrequired (mandatory-Y, optional-N, Not applicable- N/A)
statestringThe state of the order
Possible values for PA: completed, rejected
N(PR-AddLine , AddOn),
Y(PA)
notearrayExtra information about a given entityN(PR-AddLine), N(PR - ebill),
N/A (PA)
note[].textstringText of the noteN(PR-AddLine), N(PR - ebill), N/A (PA)
note[].@typestringDefines type as CampaignCode and default value is 'ECO.N(PR - ebill), N/A (PA)
categorystringUsed to categorize the order from a business perspective that can be useful for the OM system (e.g. "enterprise", "residential", ...)Y(PA) , N(PR - ebill)
orderDatestringDate when the order was createdY(PA)
requestedCompletionDatestringRequested delivery date from the requestor perspective
Note for PA: This field mandatory when the state is completed
Y(PA)
cancellationReasonstringReason why the order is cancelled. This is used when order is cancelled.
Note for PA: This field mandatory when the state is rejected
Y(PA)
requestedStartDatestringOrder fulfillment start date wished by the requestor
Note for PA: This field mandatory when the state is completed
Y(PA)
productOrderItem[]arrayAn identified part of the order. A product order is decomposed into one or more order items.Y(PA)
productOrderItem[].idstringdentifier of the line item (generally it is a sequence number 01, 02, 03, ...)Y(PA), Y (PR - ebill)
productOrderItem[].quantityintegerQuantity orderedY(PA) N (PR - ebill)
productOrderItem[].actionstringaction to be performed on the product
Note for PA: The action is "add"
Note for PR -ebill usecase: The action is used to ON or OFF eBill. Can be: add, delete.
Y(PA), Y (PR - ebill)
productOrderItem[].productOfferingobjectA product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information.Y(PA)
productOrderItem[].productOffering.idstringUnique identifier of a productOffering entity.Y(PA)
productOrderItem[].productOffering.namestringname of the productOffering entity.Y(PA)
productOrderItem[].productOffering.@referredTypestringThe actual type of the target instance when needed for disambiguation.Y(PA)
productOrderItem.productObject ArrayA product to be created defined by value or existing defined by reference.N (PR - ebill), Y (PA)
productOrderItem.product.idStringUnique identifier of the product.N (PR - ebill), N/A (PA)
productOrderItem.product.isBundleBooleanIf true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOfferingN (PR - ebill), N/A (PA)
productOrderItem.product.@typeStringWhen sub-classing, this defines the sub-class entity nameN (PR - ebill), N/A (PA)
productOrderItem.product.productCharacteristic[]Array of objectDescribes a given characteristic of an object or entity through a name/value pair.N(PR - ebill), Y (PA)
productOrderItem.product.productCharacteristic[].nameStringName of the characteristic
Note for PA:Possible Value is "MSISDN"
Y(PR - ebill), Y (PA)
productOrderItem.product.productCharacteristic[].valueTypeStringData type of the value of the characteristicN(PR - ebill), N/A (PA)
productOrderItem.product.productCharacteristic[].valueanyThe value of the characteristicN(PR - ebill), Y(PA)
productOrderItem.product.productCharacteristic[].@typeStringWhen sub-classing, this defines the sub-class entity nameN(PR - ebill), N/A (PA)
Statusstringenum: - acknowledgedN(PR - ebill), N/A (PA)
relatedParty[]arrayrelated partyN(PR - AddOn), N(PR-ebill), N/A(PA)
relatedParty[].idStringunique identifier of the related partyN(PR - AddOn), N(PR-ebill), N/A(PA)
relatedParty.nameStringName of the related entity..N(PR - ebill), N/A (PA)
relatedParty[].@referredTypeStringThe actual type of the target instance when needed for disambiguation.Y(PR-ebill), N/A(PA)
@typestringWhen sub-classing, this defines the sub-class entity nameN(PA) , N(PR - ebill)
billingAccountarrayAccount reference.N(PR - ebill), N/A (PA)
billingAccount.idStringUnique identifier Id of the EntityRefN(PR - ebill), N/A (PA)
billingAccount.@typeStringWhen sub-classing, this defines the sub-class entity nameN(PR - ebill), N/A (PA)
productOrderItem subResource response dataModel:
fieldtypedescriptionrequiredexample
idstringservice NumberY(PA)PA:
"id": "1"
quantityintegerQuantity orderedY(PA)PA:
"quantity": 1
actionstringaction of the project order itemY(PA)PA:
"action": "add"
productOfferingobjectA product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing informationY(PA)PA:
"productOffering": {
"id": "3940",
"name": "CWPPDFS0070",
"@referredType": "CampaingOffer"
}
productOffering.idstringUnique identifier of a productOfferingY(PA)PA:
"id": "3940"
productOffering.namestringname of the productOffering entityN(PA)PA:
"name": "CWPPDFS0070"
productOffering.'@referredType'stringThe actual type of the target instance when needed for disambiguation.Y(PA)PA:
"@referredType": "CampaingOffer"
productobjectA product to be created defined by value or existing defined by reference.Y(PA)PA:
"product" :
{
"productCharacteristic": [{
"name": "MSISDN",
"value": "69877689"
}]
}
product.productCharacteristicarrayDescribes a given characteristic of an object or entity through a name/value pair.Y(PA)PA:
"productCharacteristic" : [{
"name": "MSISDN",
"value": "69877689"
}]
Key Considerations :
PA Implementation:
1. This implementation is used to buy a plan for prepaid users.
2. Following are the mandatory fields in the request payload:
   - payload.category - should be sent as "PREPAID" (to identify the type of user).
   - channel[].id (to identify the channel).
   - productOrderItem[].product.productCharacteristic[].name (should be "MSISDN") and productOrderItem[].product.productCharacteristic[].value (This is MSISDN value).
   - productOrderItem[].productOffering.id (This is the Offer ID).
3. Possible values for productOrderItem[].action in request payload is "add". If the field productOrderItem[].action is not provided in the request, default value will be considered as "add".
4. This implementation accepts only one offer per request.
5. For all the dateTime fields
   - Any datetime before 1908-04-22 will show offset -05:18
   - Any datetime on or after 1908-04-22 will show offset -05:00
PR Implementation:
1. Create Order - Add Line:
    - To work this functionality, the field "@type" not empty and value must be equal to "AddLine" in request body
    - Salesforce will acknowledge in success scenario ( it's not a real time transaction response )
2. e-bill usecase:
     - If the customer need to enable paper bill (disable ebill), in the request productOrderItem.action need to be pass as "add" and if need to disable the paper bill(enable ebill) pass productOrderItem.action as "delete"

Possible Error scenarios for PA:

When order creation is rejected

{
    "category": "PREPAID",
    "orderDate": "2023-10-23T05:27:28.261-05:00",
    "cancellationReason": "Disculpe, no tiene saldo suficiente para activarse en el Plan Ilimitado +Movil",
    "state": "rejected",
    "productOrderItem": [
        {
            "id": "1",
            "quantity": 1,
            "action": "add",
            "productOffering": {
                "id": "1234",
                "name": "",
                "@referredType": "CampaingOffer"
            },
            "product": {
              "productCharacteristic": [{
                "name": "MSISDN",
                "value": "69877689"
              }]
            }
        }],
    "@type": "ProductOrder"
}

If offerID is invalid or offer details are not found

{
    "errors": [
        {
            "code": 404,
            "message": "LLA:NOT_FOUND",
            "description": "The requested offer details could not be found."
        }
    ]
}

Possible Error Scenarios for PR:

[400 ]
{
    "errors": [
        {
            "code": 400,
            "message": "SF:POST_PRODUCTORDER",
            "description": "Required parameters missing"
        }
    ]
}

Reviews